<template>
  <div>
    <van-nav-bar :title="head" left-text="返回" left-arrow @click-left="onClickLeft">
    </van-nav-bar>
    <router-link :to="{path: path}" id="route"></router-link>
  </div>
</template>

<script>
  import { NavBar } from 'vant';

  export default {
    name: "CommonReturn",
    components:{
      [NavBar.name]: NavBar,
    },
    props: ["head", "path"],
    methods:{
      onClickLeft() {
        document.getElementById("route").click();
      },
    }
  }
</script>

<style scoped>

</style>
